.class Lcom/netease/newsreader/activity/CollectDeleteActivity$1;
.super Ljava/lang/Object;
.source "CollectDeleteActivity.java"

# interfaces
.implements Landroid/view/View$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/netease/newsreader/activity/CollectDeleteActivity;->onCreate(Landroid/os/Bundle;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/netease/newsreader/activity/CollectDeleteActivity;


# direct methods
.method constructor <init>(Lcom/netease/newsreader/activity/CollectDeleteActivity;)V
    .locals 0
    .parameter

    .prologue
    .line 1
    iput-object p1, p0, Lcom/netease/newsreader/activity/CollectDeleteActivity$1;->this$0:Lcom/netease/newsreader/activity/CollectDeleteActivity;

    .line 55
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onClick(Landroid/view/View;)V
    .locals 10
    .parameter "v"

    .prologue
    const/4 v8, 0x2

    const/4 v6, 0x3

    const/4 v9, 0x0

    const/4 v7, 0x1

    .line 60
    new-instance v2, Landroid/content/ContentValues;

    invoke-direct {v2}, Landroid/content/ContentValues;-><init>()V

    .line 62
    .local v2, initialValues:Landroid/content/ContentValues;
    iget-object v4, p0, Lcom/netease/newsreader/activity/CollectDeleteActivity$1;->this$0:Lcom/netease/newsreader/activity/CollectDeleteActivity;

    invoke-static {v4}, Lcom/netease/newsreader/activity/CollectDeleteActivity;->access$0(Lcom/netease/newsreader/activity/CollectDeleteActivity;)I

    move-result v4

    if-ne v4, v8, :cond_2

    .line 63
    iget-object v4, p0, Lcom/netease/newsreader/activity/CollectDeleteActivity$1;->this$0:Lcom/netease/newsreader/activity/CollectDeleteActivity;

    invoke-static {v4}, Lcom/netease/newsreader/activity/CollectDeleteActivity;->access$1(Lcom/netease/newsreader/activity/CollectDeleteActivity;)Landroid/widget/CheckBox;

    move-result-object v4

    invoke-virtual {v4}, Landroid/widget/CheckBox;->isChecked()Z

    move-result v4

    if-eqz v4, :cond_1

    .line 64
    const-string v4, "ischecked"

    const-string v5, "1"

    invoke-virtual {v2, v4, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 65
    iget-object v4, p0, Lcom/netease/newsreader/activity/CollectDeleteActivity$1;->this$0:Lcom/netease/newsreader/activity/CollectDeleteActivity;

    invoke-static {v4}, Lcom/netease/newsreader/activity/CollectDeleteActivity;->access$2(Lcom/netease/newsreader/activity/CollectDeleteActivity;)Lcom/netease/newsreader/util/CollectPicturesAdapter;

    move-result-object v4

    invoke-virtual {v4, v7}, Lcom/netease/newsreader/util/CollectPicturesAdapter;->setCheckOrNoAllBox(Z)V

    .line 70
    :goto_0
    iget-object v4, p0, Lcom/netease/newsreader/activity/CollectDeleteActivity$1;->this$0:Lcom/netease/newsreader/activity/CollectDeleteActivity;

    iget-object v4, v4, Lcom/netease/newsreader/activity/CollectDeleteActivity;->db:Landroid/database/sqlite/SQLiteDatabase;

    const-string v5, "collect_table"

    const-string v6, "collect_type=?"

    new-array v7, v7, [Ljava/lang/String;

    iget-object v8, p0, Lcom/netease/newsreader/activity/CollectDeleteActivity$1;->this$0:Lcom/netease/newsreader/activity/CollectDeleteActivity;

    invoke-static {v8}, Lcom/netease/newsreader/activity/CollectDeleteActivity;->access$0(Lcom/netease/newsreader/activity/CollectDeleteActivity;)I

    move-result v8

    invoke-static {v8}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v8

    aput-object v8, v7, v9

    invoke-virtual {v4, v5, v2, v6, v7}, Landroid/database/sqlite/SQLiteDatabase;->update(Ljava/lang/String;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I

    .line 71
    iget-object v4, p0, Lcom/netease/newsreader/activity/CollectDeleteActivity$1;->this$0:Lcom/netease/newsreader/activity/CollectDeleteActivity;

    invoke-static {v4}, Lcom/netease/newsreader/activity/CollectDeleteActivity;->access$2(Lcom/netease/newsreader/activity/CollectDeleteActivity;)Lcom/netease/newsreader/util/CollectPicturesAdapter;

    move-result-object v4

    invoke-virtual {v4}, Lcom/netease/newsreader/util/CollectPicturesAdapter;->notifyDataSetChanged()V

    .line 100
    :cond_0
    :goto_1
    return-void

    .line 67
    :cond_1
    const-string v4, "ischecked"

    const-string v5, "0"

    invoke-virtual {v2, v4, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 68
    iget-object v4, p0, Lcom/netease/newsreader/activity/CollectDeleteActivity$1;->this$0:Lcom/netease/newsreader/activity/CollectDeleteActivity;

    invoke-static {v4}, Lcom/netease/newsreader/activity/CollectDeleteActivity;->access$2(Lcom/netease/newsreader/activity/CollectDeleteActivity;)Lcom/netease/newsreader/util/CollectPicturesAdapter;

    move-result-object v4

    invoke-virtual {v4, v9}, Lcom/netease/newsreader/util/CollectPicturesAdapter;->setCheckOrNoAllBox(Z)V

    goto :goto_0

    .line 72
    :cond_2
    iget-object v4, p0, Lcom/netease/newsreader/activity/CollectDeleteActivity$1;->this$0:Lcom/netease/newsreader/activity/CollectDeleteActivity;

    invoke-static {v4}, Lcom/netease/newsreader/activity/CollectDeleteActivity;->access$0(Lcom/netease/newsreader/activity/CollectDeleteActivity;)I

    move-result v4

    if-eq v4, v7, :cond_3

    iget-object v4, p0, Lcom/netease/newsreader/activity/CollectDeleteActivity$1;->this$0:Lcom/netease/newsreader/activity/CollectDeleteActivity;

    invoke-static {v4}, Lcom/netease/newsreader/activity/CollectDeleteActivity;->access$0(Lcom/netease/newsreader/activity/CollectDeleteActivity;)I

    move-result v4

    if-ne v4, v6, :cond_6

    .line 73
    :cond_3
    iget-object v4, p0, Lcom/netease/newsreader/activity/CollectDeleteActivity$1;->this$0:Lcom/netease/newsreader/activity/CollectDeleteActivity;

    invoke-static {v4}, Lcom/netease/newsreader/activity/CollectDeleteActivity;->access$1(Lcom/netease/newsreader/activity/CollectDeleteActivity;)Landroid/widget/CheckBox;

    move-result-object v4

    invoke-virtual {v4}, Landroid/widget/CheckBox;->isChecked()Z

    move-result v4

    if-eqz v4, :cond_4

    .line 74
    const-string v4, "ischecked"

    const-string v5, "1"

    invoke-virtual {v2, v4, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 75
    iget-object v4, p0, Lcom/netease/newsreader/activity/CollectDeleteActivity$1;->this$0:Lcom/netease/newsreader/activity/CollectDeleteActivity;

    invoke-static {v4}, Lcom/netease/newsreader/activity/CollectDeleteActivity;->access$3(Lcom/netease/newsreader/activity/CollectDeleteActivity;)Lcom/netease/newsreader/util/CollectArticleAdapter;

    move-result-object v4

    invoke-virtual {v4, v7}, Lcom/netease/newsreader/util/CollectArticleAdapter;->setCheckOrNoAllBox(Z)V

    .line 81
    :goto_2
    const-string v3, ""

    .line 82
    .local v3, sql:Ljava/lang/String;
    const/4 v0, 0x0

    check-cast v0, [Ljava/lang/String;

    .line 83
    .local v0, conditions:[Ljava/lang/String;
    iget-object v4, p0, Lcom/netease/newsreader/activity/CollectDeleteActivity$1;->this$0:Lcom/netease/newsreader/activity/CollectDeleteActivity;

    invoke-static {v4}, Lcom/netease/newsreader/activity/CollectDeleteActivity;->access$0(Lcom/netease/newsreader/activity/CollectDeleteActivity;)I

    move-result v4

    if-ne v4, v6, :cond_5

    .line 84
    const-string v3, "collect_type=? or collect_type=?"

    .line 85
    new-array v0, v8, [Ljava/lang/String;

    .end local v0           #conditions:[Ljava/lang/String;
    invoke-static {v6}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v4

    aput-object v4, v0, v9

    const/4 v4, 0x4

    invoke-static {v4}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v4

    aput-object v4, v0, v7

    .line 91
    .restart local v0       #conditions:[Ljava/lang/String;
    :goto_3
    iget-object v4, p0, Lcom/netease/newsreader/activity/CollectDeleteActivity$1;->this$0:Lcom/netease/newsreader/activity/CollectDeleteActivity;

    iget-object v4, v4, Lcom/netease/newsreader/activity/CollectDeleteActivity;->db:Landroid/database/sqlite/SQLiteDatabase;

    const-string v5, "collect_table"

    invoke-virtual {v4, v5, v2, v3, v0}, Landroid/database/sqlite/SQLiteDatabase;->update(Ljava/lang/String;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I

    .line 92
    iget-object v4, p0, Lcom/netease/newsreader/activity/CollectDeleteActivity$1;->this$0:Lcom/netease/newsreader/activity/CollectDeleteActivity;

    invoke-static {v4}, Lcom/netease/newsreader/activity/CollectDeleteActivity;->access$3(Lcom/netease/newsreader/activity/CollectDeleteActivity;)Lcom/netease/newsreader/util/CollectArticleAdapter;

    move-result-object v4

    invoke-virtual {v4}, Lcom/netease/newsreader/util/CollectArticleAdapter;->notifyDataSetChanged()V

    goto :goto_1

    .line 77
    .end local v0           #conditions:[Ljava/lang/String;
    .end local v3           #sql:Ljava/lang/String;
    :cond_4
    const-string v4, "ischecked"

    const-string v5, "0"

    invoke-virtual {v2, v4, v5}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 78
    iget-object v4, p0, Lcom/netease/newsreader/activity/CollectDeleteActivity$1;->this$0:Lcom/netease/newsreader/activity/CollectDeleteActivity;

    invoke-static {v4}, Lcom/netease/newsreader/activity/CollectDeleteActivity;->access$3(Lcom/netease/newsreader/activity/CollectDeleteActivity;)Lcom/netease/newsreader/util/CollectArticleAdapter;

    move-result-object v4

    invoke-virtual {v4, v9}, Lcom/netease/newsreader/util/CollectArticleAdapter;->setCheckOrNoAllBox(Z)V

    goto :goto_2

    .line 87
    .restart local v0       #conditions:[Ljava/lang/String;
    .restart local v3       #sql:Ljava/lang/String;
    :cond_5
    const-string v3, "collect_type=?"

    .line 88
    new-array v0, v7, [Ljava/lang/String;

    .end local v0           #conditions:[Ljava/lang/String;
    invoke-static {v7}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v4

    aput-object v4, v0, v9

    .restart local v0       #conditions:[Ljava/lang/String;
    goto :goto_3

    .line 94
    .end local v0           #conditions:[Ljava/lang/String;
    .end local v3           #sql:Ljava/lang/String;
    :cond_6
    iget-object v4, p0, Lcom/netease/newsreader/activity/CollectDeleteActivity$1;->this$0:Lcom/netease/newsreader/activity/CollectDeleteActivity;

    invoke-static {v4}, Lcom/netease/newsreader/activity/CollectDeleteActivity;->access$3(Lcom/netease/newsreader/activity/CollectDeleteActivity;)Lcom/netease/newsreader/util/CollectArticleAdapter;

    move-result-object v4

    invoke-virtual {v4}, Lcom/netease/newsreader/util/CollectArticleAdapter;->notifyDataSetChanged()V

    .line 95
    const/4 v1, 0x0

    .local v1, i:I
    :goto_4
    iget-object v4, p0, Lcom/netease/newsreader/activity/CollectDeleteActivity$1;->this$0:Lcom/netease/newsreader/activity/CollectDeleteActivity;

    invoke-static {v4}, Lcom/netease/newsreader/activity/CollectDeleteActivity;->access$3(Lcom/netease/newsreader/activity/CollectDeleteActivity;)Lcom/netease/newsreader/util/CollectArticleAdapter;

    move-result-object v4

    invoke-virtual {v4}, Lcom/netease/newsreader/util/CollectArticleAdapter;->getCount()I

    move-result v4

    if-ge v1, v4, :cond_0

    add-int/lit8 v1, v1, 0x1

    goto :goto_4
.end method
